import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

import actions from './actions'
import cate from './modules/cate'
import {state ,getters,mutations} from './mutations'
import goods from './modules/goods'
import specs from './modules/specs'
import vip from './modules/vip'
import banner from './modules/banner'
import seckill from './modules/seckill'
export default new Vuex.Store({
 // 仓库存放数据
 state,
 // 创建方法修改仓库state数据 
 mutations,
 // 类似计算机属性
 getters,
 //actions第一次参数指的仓库自己一般用context
 // actions通过context.commit让mutations中的方发去修改state仓库的数据
 actions,
 // 模块
  modules: {
      cate,
      specs,
      goods,
      vip,
      banner,
      seckill

  }
})
